Integrand size = 8, antiderivative size = 79 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=x \cos \left (a+\frac {b}{x^2}\right )+\sqrt {b} \sqrt {2 \pi } \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\sqrt {b} \sqrt {2 \pi } \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a) \]
x*cos(a+b/x^2)+cos(a)*FresnelS(b^(1/2)*2^(1/2)/Pi^(1/2)/x)*b^(1/2)*2^(1/2) *Pi^(1/2)+FresnelC(b^(1/2)*2^(1/2)/Pi^(1/2)/x)*sin(a)*b^(1/2)*2^(1/2)*Pi^( 1/2)
Time = 0.15 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.01 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=x \cos (a) \cos \left (\frac {b}{x^2}\right )+\sqrt {b} \sqrt {2 \pi } \left (\cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )+\operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right ) \sin (a)\right )-x \sin (a) \sin \left (\frac {b}{x^2}\right ) \]
x*Cos[a]*Cos[b/x^2] + Sqrt[b]*Sqrt[2*Pi]*(Cos[a]*FresnelS[(Sqrt[b]*Sqrt[2/ Pi])/x] + FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x]*Sin[a]) - x*Sin[a]*Sin[b/x^2]
Time = 0.33 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {3841, 3869, 3834, 3832, 3833}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos \left (a+\frac {b}{x^2}\right ) \, dx\) |
\(\Big \downarrow \) 3841 |
\(\displaystyle -\int x^2 \cos \left (a+\frac {b}{x^2}\right )d\frac {1}{x}\) |
\(\Big \downarrow \) 3869 |
\(\displaystyle 2 b \int \sin \left (a+\frac {b}{x^2}\right )d\frac {1}{x}+x \cos \left (a+\frac {b}{x^2}\right )\) |
\(\Big \downarrow \) 3834 |
\(\displaystyle 2 b \left (\sin (a) \int \cos \left (\frac {b}{x^2}\right )d\frac {1}{x}+\cos (a) \int \sin \left (\frac {b}{x^2}\right )d\frac {1}{x}\right )+x \cos \left (a+\frac {b}{x^2}\right )\) |
\(\Big \downarrow \) 3832 |
\(\displaystyle 2 b \left (\sin (a) \int \cos \left (\frac {b}{x^2}\right )d\frac {1}{x}+\frac {\sqrt {\frac {\pi }{2}} \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}\right )+x \cos \left (a+\frac {b}{x^2}\right )\) |
\(\Big \downarrow \) 3833 |
\(\displaystyle 2 b \left (\frac {\sqrt {\frac {\pi }{2}} \sin (a) \operatorname {FresnelC}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}+\frac {\sqrt {\frac {\pi }{2}} \cos (a) \operatorname {FresnelS}\left (\frac {\sqrt {b} \sqrt {\frac {2}{\pi }}}{x}\right )}{\sqrt {b}}\right )+x \cos \left (a+\frac {b}{x^2}\right )\) |
x*Cos[a + b/x^2] + 2*b*((Sqrt[Pi/2]*Cos[a]*FresnelS[(Sqrt[b]*Sqrt[2/Pi])/x ])/Sqrt[b] + (Sqrt[Pi/2]*FresnelC[(Sqrt[b]*Sqrt[2/Pi])/x]*Sin[a])/Sqrt[b])
3.1.40.3.1 Defintions of rubi rules used
Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ d, 2]))*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]/(f*Rt[ d, 2]))*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)], x] /; FreeQ[{d, e, f}, x]
Int[Sin[(c_) + (d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[Sin[c] In t[Cos[d*(e + f*x)^2], x], x] + Simp[Cos[c] Int[Sin[d*(e + f*x)^2], x], x] /; FreeQ[{c, d, e, f}, x]
Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.), x_S ymbol] :> Simp[-f^(-1) Subst[Int[(a + b*Cos[c + d/x^n])^p/x^2, x], x, 1/( e + f*x)], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 0] && ILtQ[n, 0] & & EqQ[n, -2]
Int[Cos[(c_.) + (d_.)*(x_)^(n_)]*((e_.)*(x_))^(m_), x_Symbol] :> Simp[(e*x) ^(m + 1)*(Cos[c + d*x^n]/(e*(m + 1))), x] + Simp[d*(n/(e^n*(m + 1))) Int[ (e*x)^(m + n)*Sin[c + d*x^n], x], x] /; FreeQ[{c, d, e}, x] && IGtQ[n, 0] & & LtQ[m, -1]
Time = 0.48 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.72
method | result | size |
derivativedivides | \(x \cos \left (a +\frac {b}{x^{2}}\right )+\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )+\sin \left (a \right ) \operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) | \(57\) |
default | \(x \cos \left (a +\frac {b}{x^{2}}\right )+\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \left (a \right ) \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )+\sin \left (a \right ) \operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )\) | \(57\) |
risch | \(\frac {i {\mathrm e}^{-i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {i b}}{x}\right )}{2 \sqrt {i b}}-\frac {i {\mathrm e}^{i a} b \sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {-i b}}{x}\right )}{2 \sqrt {-i b}}+x \cos \left (\frac {a \,x^{2}+b}{x^{2}}\right )\) | \(74\) |
meijerg | \(-\frac {\cos \left (a \right ) \sqrt {\pi }\, \sqrt {2}\, \left (b^{2}\right )^{\frac {1}{4}} \left (-\frac {4 x \sqrt {2}\, \cos \left (\frac {b}{x^{2}}\right )}{\sqrt {\pi }\, \left (b^{2}\right )^{\frac {1}{4}}}-\frac {8 \sqrt {b}\, \operatorname {S}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )}{\left (b^{2}\right )^{\frac {1}{4}}}\right )}{8}+\frac {\sqrt {\pi }\, \sin \left (a \right ) \sqrt {2}\, \sqrt {b}\, \left (-\frac {4 \sqrt {2}\, x \sin \left (\frac {b}{x^{2}}\right )}{\sqrt {b}\, \sqrt {\pi }}+8 \,\operatorname {C}\left (\frac {\sqrt {b}\, \sqrt {2}}{\sqrt {\pi }\, x}\right )\right )}{8}\) | \(110\) |
x*cos(a+b/x^2)+b^(1/2)*2^(1/2)*Pi^(1/2)*(cos(a)*FresnelS(b^(1/2)*2^(1/2)/P i^(1/2)/x)+sin(a)*FresnelC(b^(1/2)*2^(1/2)/Pi^(1/2)/x))
Time = 0.28 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.92 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\sqrt {2} \pi \sqrt {\frac {b}{\pi }} \cos \left (a\right ) \operatorname {S}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) + \sqrt {2} \pi \sqrt {\frac {b}{\pi }} \operatorname {C}\left (\frac {\sqrt {2} \sqrt {\frac {b}{\pi }}}{x}\right ) \sin \left (a\right ) + x \cos \left (\frac {a x^{2} + b}{x^{2}}\right ) \]
sqrt(2)*pi*sqrt(b/pi)*cos(a)*fresnel_sin(sqrt(2)*sqrt(b/pi)/x) + sqrt(2)*p i*sqrt(b/pi)*fresnel_cos(sqrt(2)*sqrt(b/pi)/x)*sin(a) + x*cos((a*x^2 + b)/ x^2)
\[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int \cos {\left (a + \frac {b}{x^{2}} \right )}\, dx \]
Result contains complex when optimal does not.
Time = 0.38 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.61 \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\frac {\sqrt {2} {\left (2 \, \sqrt {2} b x^{2} \sqrt {\frac {1}{x^{4}}} \cos \left (\frac {a x^{2} + b}{x^{2}}\right ) + {\left ({\left (\left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} - \left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \cos \left (a\right ) + {\left (-\left (i - 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {i \, b}{x^{2}}}\right ) - 1\right )} + \left (i + 1\right ) \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {i \, b}{x^{2}}}\right ) - 1\right )}\right )} \sin \left (a\right )\right )} b \left (\frac {b^{2}}{x^{4}}\right )^{\frac {1}{4}}\right )} \sqrt {x^{4}}}{4 \, b x} \]
1/4*sqrt(2)*(2*sqrt(2)*b*x^2*sqrt(x^(-4))*cos((a*x^2 + b)/x^2) + (((I + 1) *sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) - (I - 1)*sqrt(pi)*(erf(sqrt(-I*b/x^2)) - 1))*cos(a) + (-(I - 1)*sqrt(pi)*(erf(sqrt(I*b/x^2)) - 1) + (I + 1)*sqrt (pi)*(erf(sqrt(-I*b/x^2)) - 1))*sin(a))*b*(b^2/x^4)^(1/4))*sqrt(x^4)/(b*x)
\[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int { \cos \left (a + \frac {b}{x^{2}}\right ) \,d x } \]
Timed out. \[ \int \cos \left (a+\frac {b}{x^2}\right ) \, dx=\int \cos \left (a+\frac {b}{x^2}\right ) \,d x \]